using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Features
{
    /// <summary>
    /// <para>XY Table To Point</para>
    /// <para>Creates a new point feature class based on x-, y-, and z-coordinates from a table.</para>
    /// <para>基于表中的 x、y 和 z 坐标创建新的点要素类。</para>
    /// </summary>    
    [DisplayName("XY Table To Point")]
    public class XYTableToPoint : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public XYTableToPoint()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The table containing the x- and y-coordinates that define the locations of the point features to create.</para>
        /// <para>包含定义要创建的点要素位置的 x 坐标和 y 坐标的表。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The feature class containing the output point features.</para>
        /// <para>包含输出点要素的要素类。</para>
        /// </param>
        /// <param name="_x_field">
        /// <para>X Field</para>
        /// <para>The field in the input table that contains the x-coordinates (or longitude).</para>
        /// <para>输入表中包含 x 坐标（或经度）的字段。</para>
        /// </param>
        /// <param name="_y_field">
        /// <para>Y Field</para>
        /// <para>The field in the input table that contains the y-coordinates (or latitude).</para>
        /// <para>输入表中包含 y 坐标（或纬度）的字段。</para>
        /// </param>
        public XYTableToPoint(object _in_table, object _out_feature_class, object _x_field, object _y_field)
        {
            this._in_table = _in_table;
            this._out_feature_class = _out_feature_class;
            this._x_field = _x_field;
            this._y_field = _y_field;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "XY Table To Point";

        public override string CallName => "management.XYTableToPoint";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_in_table, _out_feature_class, _x_field, _y_field, _z_field, _coordinate_system];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The table containing the x- and y-coordinates that define the locations of the point features to create.</para>
        /// <para>包含定义要创建的点要素位置的 x 坐标和 y 坐标的表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The feature class containing the output point features.</para>
        /// <para>包含输出点要素的要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>X Field</para>
        /// <para>The field in the input table that contains the x-coordinates (or longitude).</para>
        /// <para>输入表中包含 x 坐标（或经度）的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("X Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _x_field { get; set; }


        /// <summary>
        /// <para>Y Field</para>
        /// <para>The field in the input table that contains the y-coordinates (or latitude).</para>
        /// <para>输入表中包含 y 坐标（或纬度）的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Y Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _y_field { get; set; }


        /// <summary>
        /// <para>Z Field</para>
        /// <para>The field in the input table that contains the z-coordinates.</para>
        /// <para>输入表中包含 z 坐标的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _z_field { get; set; } = null;


        /// <summary>
        /// <para>Coordinate System</para>
        /// <para>The coordinate system of the x- and y-coordinates. This will be the coordinate system of the output feature class.</para>
        /// <para>x 和 y 坐标的坐标系。这将是输出要素类的坐标系。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Coordinate System")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _coordinate_system { get; set; } = null;


        public XYTableToPoint SetEnv(object extent = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}